package com.yxinsur.imc.business.events.publisher;


import com.yxinsur.imc.business.domain.ImcTenant;
import com.yxinsur.imc.business.events.event.TenantCreateEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * 租户信息录入发布类
 */
@Component
public class TenantCreateEventPublisher {

    @Autowired
    private ApplicationContext applicationContext;

    public void pushlish(String msg, ImcTenant tenant){
        applicationContext.publishEvent(new TenantCreateEvent(this, msg,tenant));
    }
}
